-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - refactor(CategoryTheory/Monoidal/Braided): use monoidalComp in the proofs #10078
Conversation
yuma-mizuno
commented
Jan 28, 2024
•
edited by alreadydone
Loading
edited by alreadydone
- depends on: [Merged by Bors] - feat(CategoryTheory/Monoidal): partially setting simp lemmas #10061
This PR/issue depends on: |
|
||
#align category_theory.braiding_left_unitor_aux₂ CategoryTheory.braiding_leftUnitor_aux₂ | ||
|
||
@[simp] | ||
theorem braiding_leftUnitor (X : C) : (β_ X (𝟙_ C)).hom ≫ (λ_ X).hom = (ρ_ X).hom := by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add the reassoc
attribute here.
theorem braiding_rightUnitor (X : C) : (β_ (𝟙_ C) X).hom ≫ (ρ_ X).hom = (λ_ X).hom := by | ||
rw [← tensor_left_iff, id_tensor_comp, braiding_rightUnitor_aux₂] | ||
rw [← whiskerLeft_iff, MonoidalCategory.whiskerLeft_comp, braiding_rightUnitor_aux₂] | ||
#align category_theory.braiding_right_unitor CategoryTheory.braiding_rightUnitor | ||
|
||
@[simp] | ||
theorem braiding_tensorUnit_left (X : C) : (β_ (𝟙_ C) X).hom = (λ_ X).hom ≫ (ρ_ X).inv := by | ||
simp [← braiding_rightUnitor] | ||
|
||
theorem leftUnitor_inv_braiding (X : C) : (λ_ X).inv ≫ (β_ (𝟙_ C) X).hom = (ρ_ X).inv := by | ||
apply (cancel_mono (ρ_ X).hom).1 | ||
simp only [assoc, braiding_rightUnitor, Iso.inv_hom_id] | ||
simp | ||
#align category_theory.left_unitor_inv_braiding CategoryTheory.leftUnitor_inv_braiding | ||
|
||
@[simp] | ||
theorem rightUnitor_inv_braiding (X : C) : (ρ_ X).inv ≫ (β_ X (𝟙_ C)).hom = (λ_ X).inv := by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lemmas braiding_rightUnitor
, braiding_tensorUnit_left
, leftUnitor_inv_braiding
and rightUnitor_inv_braiding
should have the reassoc
attr, as well as braiding_tensorUnit_right
below.
(𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).hom) ≫ (α_ X₁ Y₁ (X₂ ⊗ Y₂)).inv := | ||
by dsimp [tensor_μ]; simp | ||
#align category_theory.tensor_μ_def₂ CategoryTheory.tensor_μ_def₂ | ||
|
||
theorem tensor_μ_natural {X₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : U₁ ⟶ V₁) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reassoc
could be useful here also.
convert tensor_μ_natural C (𝟙 Z₁) (𝟙 Z₂) f₁ f₂ using 1; simp | ||
(Z₁ ⊗ Z₂) ◁ (f₁ ⊗ f₂) ≫ tensor_μ C (Z₁, Z₂) (Y₁, Y₂) = | ||
tensor_μ C (Z₁, Z₂) (X₁, X₂) ≫ (Z₁ ◁ f₁ ⊗ Z₂ ◁ f₂) := by | ||
convert tensor_μ_natural C (𝟙 Z₁) (𝟙 Z₂) f₁ f₂ using 1 <;> simp | ||
|
||
theorem tensor_left_unitality (X₁ X₂ : C) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reassoc
should also be added to lemmas tensor_left_unitality
, tensor_right_unitality
, tensor_associativity
, leftUnitor_monoidal
, rightUnitor_monoidal
, associator_monoidal
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding reassoc
to tensor_associativity
and associator_monoidal
seems to give errors unless we increase the maxHeartbeats
. Do you think it's OK to do this, or should we postpone adding reassoc
until some optimization is done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the line attribute [reassoc] tensor_associativity associator_monoidal
after the declarations seem to work without increasing maxHeartbeats
.
@[reassoc] | ||
theorem leftUnitor_inv_naturality' {X Y : C} (f : X ⟶ Y) : | ||
f ≫ (λ_ Y).inv = (λ_ X).inv ≫ (_ ◁ f) := by simp | ||
f ≫ (λ_ Y).inv = (λ_ X).inv ≫ _ ◁ f := by simp | ||
|
||
theorem id_whiskerLeft_symm {X X' : C} (f : X ⟶ X') : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reassoc
can be added to id_whiskerLeft_symm
and whiskerRight_id_symm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this great work! Apart from the reassoc
attribute which shoud be added to some lemmas, this looks good to me.
Thanks! bors merge |
Pull request successfully merged into master. Build succeeded: |